	
	//获取所有图片列表
	var list = document.getElementsByClassName('list');

	var box = document.getElementsByClassName('box');

	var click_list =document.getElementsByClassName('click_list');

	var turn_left = document.getElementById('turn_left');

	var turn_right = document.getElementById('turn_right');


	//定义初始展现index
	var num =0;

	function run () {

		for (var i = 0; i < list.length; i++) {
			list[i].style.display='none';
			click_list[i].style.backgroundColor='#8B8B8B';
		};

		list[num].style.display='block';
		click_list[num].style.backgroundColor='#fff';
		

		if(num==list.length-1){
			num=0;
		}else{
			num++;
		}

		
	}

	run();
	time = setInterval(run, 1000);


	box[0].onmouseover = function (){
		clearInterval(time);
	}


	box[0].onmouseout = function (){
		time = setInterval(run, 1000);
	}

	for (var k = 0; k < click_list.length; k++) {
		clickList(k);
	};

	function clickList(k){
		click_list[k].onclick =function (){
			num = k;
			run();
		}
	}

	turn_left.onclick = function  (argument) {

		if(num==0){
			num = list.length-2;
		}else if(num==1){
			num = list.length-1;
		}else{
			num -=2; 
		}
		
		run();
	}

	turn_right.onclick = function  (argument) {
		run();
	}


	// 子菜单效果

	var menu_list = document.getElementsByClassName('menu_list');

	var son_list = document.getElementsByClassName('son_list');

	for (var i = 0; i <menu_list.length; i++) {

		menuover(i);
		menuout(i);
		
	};

	function menuover (i) {
		menu_list[i].onmouseover = function  () {
			son_list[i].style.display="block";
		}
	}

	function menuout (i) {
		menu_list[i].onmouseout = function  () {
			son_list[i].style.display="none";
		}
	}



